package com.itheima.day04.objects;

import cn.hutool.core.util.ObjectUtil;
import com.itheima.day03.ZuoYe.ZuoYe3.Car;

import java.util.Objects;

public class test {public static void main(String[] args) {
    Pig P = new Pig("w",0,"N");
    Pig P2 = new Pig("w",0,"N");
    System.out.println(P);
    System.out.println(P2);
    if(Objects.equals(P,P2)){
        System.out.println("相同");
    }else{
        System.out.println("不相等");
    }
    if(ObjectUtil.equals(P,P2)){
        System.out.println("相同");
    }else{
        System.out.println("不相等");
    }
}
}
